{if !empty($data.options)}
<select
    {foreach $data.attrs as $key => $attr}
    {if $key != 'value'}
    {$key}="{$attr}"
    {/if}
    {/foreach}
>
    <option value="">请选择≡{$data.label}≡</option>
    {foreach $data.options as $value => $title}
    {if !is_array($title)}
    <option value="{$value}" {if ($data.attrs.value ?? '') == $value}selected{/if}>{$title}</option>
    {else}
        <optgroup label="{$value}">
            {foreach $title as $value1 => $title1}
            <option value="{$value1}" {if ($data.attrs.value ?? '') == $value1}selected{/if}>{$title1}</option>
            {/foreach}
        </optgroup>
    {/if}
    {/foreach}
</select>
{/if}